package org.layuiframework.generator.annotation;

public enum DbType {
    MYSQL("mysql", "MySql数据库"),
    POSTGRE_SQL("postgresql", "Postgre数据库"),
    OTHER("other", "其他数据库");

    private final String db;
    private final String desc;

    public static DbType getDbType(String dbType) {
        DbType[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            DbType type = var1[var3];
            if (type.db.equalsIgnoreCase(dbType)) {
                return type;
            }
        }
        return OTHER;
    }

    public String getDb() {
        return this.db;
    }

    public String getDesc() {
        return this.desc;
    }

    private DbType(final String db, final String desc) {
        this.db = db;
        this.desc = desc;
    }
}
